<?php
/**
 * Created by PhpStorm.
 * User: 哇咔咔
 * Date: 17-9-4
 * Time: 上午10:48
 */

defined('BASEPATH') OR exit('No direct script access allowed');

class Home extends MY_Controller {
     function index(){
         $data['company'] = parent::company();//公司基本信息
         $arr = array(
             'company_id'=>$data['company'] ['id'],
             'pic_type' =>  '01',
             'del_flag' =>  '0'
         );
         $data['url'] =parent::pic_url($data['company'] ['id']);
         //获取轮播图
         $data['pic'] = $this->db->from('picture')->where($arr)->limit(2,0)->order_by('sort','desc')->get()->result_array();
         $arr1 = parent::arr();
         //获取服务列表
         $data['service'] = $this->db->from('service_info')->where($arr1)->limit(5,0)->get()->result_array();
         //获取项目类型
         $data['product_type'] = $this->db->from('product_type')->where($arr1)->order_by('sort','desc')->get()->result_array();
        //获取项目列表
         $data['product_info'] = $this->db->from('product_info')->where($arr1)->limit(6,0)->order_by('create_by','desc')->get()->result_array();
         //获取团队列表
         $data['team'] = $this->db->from('team_info')->where($arr1)->limit(4,0)->order_by('create_by','desc')->get()->result_array();
         //获取新闻列表
         $data['news'] = $this->db->from('news_info')->where($arr1)->order_by('create_by','desc')->get()->result_array();
         $this->load->view('index',$data);
     }

}